#include "widget.h"
#include "ui_widget.h"
#include <QPushButton>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    QPushButton* button = new QPushButton(this);
    button->setText("按钮");
    button->move(200, 300);

    connect(button, &QPushButton::clicked,this, [button,this](){
        qDebug() << "lambda 被执行了！";
        button->move(300,300);
        this->move(400,400);
    });
}

Widget::~Widget()
{
    delete ui;
}
